<?php

@session_start();
include_once('Classes/Connect.php');
include('Classes/Utils.php');

global $dbSingleton;

$maxId = $dbSingleton->query('SELECT MAX(id) AS last_sync FROM msa_slotobject');
if (is_object($maxId)) {
    $maxId->setFetchMode(PDO::FETCH_OBJ);
    echo $maxId->last_sync;
} else {
    echo 0;
}